<?/**
* Copyright (c) 2002-2007 BioWare Corp.
* http://www.bigdaddymonitor.org
*
* This file is part of the BigDaddy Monitoring
* program. It is free software distributed under
* the terms of the BSD License. It is ditributed
* in the hopes that it will be useful, but
* WITHOUT ANY WARRANTY; without event the implied
* warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE.
*
* The BSD License is available from:
* http://www.opensource.org/licenses/bsd-license.php
**/
?>
<p>
Role: <?=$aRoleInfo["roleName"];?><br>
Role Type: <?=$aRoleInfo["roleType"];?>
</p>

<p>View Roles in <a href="<?=$_SERVER["PHP_SELF"];?>?page=listrole&type=<?=$aRoleInfo["roleTypeID"];?>"><?=$aRoleInfo["roleType"];?></a></p>

<p><b>Add User</b></p>

<form name="adduser" method="post" action="<?=$_SERVER["PHP_SELF"];?>">

<table border="0" cellpadding="0" cellspacing="0" class="app_table">
<tr class="app_mainrow">
    <td>
	<b>Type In username</b>
    </td>
    <td>
	<input type="text" value="" name="username" class="app_textinput">
    </td>
    <td>
	<input type="submit" name="submit" value="Add User" class="app_submit">
	<input type="hidden" name="roleID" value="<?=$_REQUEST["ID"];?>">
	<input type="hidden" name="page" value="setroleuser">
    </td>
</tr>
</table>

<p><i>Only active and "special" users in the database will be added</i></p>

</form>

<table border="0" cellpadding="0" cellspacing="0" class="sortable app_table" id="table1">
<tr class="app_mainrow">
    <td>
	<b>username</b>
    </td>
    <td>
	<b>Employee Name</b>
    </td>
    <td>
	<b>Options</b>
    </td>
</tr>

<?
$aResult=$RoleAdmin->GetUsersByRoleID($_REQUEST["ID"], "INCLUDE_SPECIAL");

if (is_array($aResult))
{
    for ($i=0; $i<count($aResult);$i++)
    {
	?>
	<tr valign="top" class="app_row">
	    <td>
		<?=$aResult[$i]["username"];?>
	    </td>
	    <td>
		<?=$aResult[$i]["cn"];?>
	    </td>
	    <td>
		<a href="<?=$_SERVER["PHP_SELF"];?>?page=removeroleuser&username=<?=$aResult[$i]["username"];?>&roleID=<?=$_REQUEST["ID"];?>" onclick="javascript: return confirm('Are you sure?');">Delete</a>
	    </td>
	</tr>
	<?
	
    }
}

?>

</table>



